<div class="row toolbar">
  <div class="col-md-6">
    <span class="toolbar-header">
      <%= t :invoice_detail_list %>
    </span>
  </div>
  <div class="col-md-6 text-right">
    <ul class="toolbar-nav">
      <li><%= link_to feather_icon('circle-plus'), new_invoice_invoice_detail_path %></li>
      <li><% link_to feather_icon('trash'), new_invoice_invoice_detail_path %></li>
      <li><% link_to feather_icon('file-add'), new_invoice_invoice_detail_path %></li>
    </ul>
    <input type="text" placeholder="Search" class="search-box" />
  </div>
</div>

<table class="table table-striped">
  <thead>
    <tr>
      <th><%= t :actions %></th>
      <th><%= t :invoice %></th>
      <th><%= t :invoice_item_type %></th>
      <th><%= t :fee %></th>
      <th><%= t :discount %></th>
      <th><%= t :created_at %></th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @invoice_details.each do |invoice_detail| %>
      <tr>
        <td><%= link_to feather_icon('circle-plus'), invoice_detail %>
        <%= link_to simple_icon('note'), edit_invoice_detail_path(invoice_detail) %>
        <%= link_to feather_icon('trash'), invoice_detail, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        <td><%= invoice_detail.invoice_id %></td>
        <td><%= invoice_detail.stock_logging.drugs %></td>
        <td><%= invoice_detail.fee %></td>
        <td><%= invoice_detail.discount %></td>
        <td><%= invoice_detail.created_at %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to "#{t(:new_invoice_detail)}", new_invoice_detail_path %>
